//
// Created by jsjxsy on 2022/9/9.
//职工管理系统
//
#include <workerManager.h>
#include <Worker.h>
#include <Manager.h>
#include <Employee.h>
#include <Boss.h>

void process() {
  int choice = 0;
  WorkerManager wm;
  while (true) {
    wm.Show_Menu();
    cout << "请选择:" << endl;
    cin >> choice;
    switch (choice) {
      case 0:wm.Exit_System();
        break;
      case 1:wm.Add_Worker();
        break;
      case 2:wm.Show_Worker();
        break;
      case 3:wm.Delete_Worker();
        break;
      case 4:wm.Modify_Worker();
        break;
      case 5:wm.Find_Worker();
        break;
      case 6:wm.Sort_ByNumber();
        break;
      case 7:wm.clear();
        break;
    }
  }
}

void test01() {
  Worker *worker = nullptr;
  worker = new Employee(1, "张三", 10);
  worker->Show_Information();
  delete worker;

  worker = new Manager(2, "李四", 12);
  worker->Show_Information();
  delete worker;

  worker = new Boss(3, "王五", 13);
  worker->Show_Information();
  delete worker;
}

void test02() {
  process();
}


int main() {
  //test01();
  test02();
  return 0;
}

